/**
 * \file hash.h
 * \brief Hashing function(s).
 **/

#ifndef R_HASH_H
#define R_HASH_H

#include "standard.h"

/**
 * \brief This hash is taken from the code written by Paul Hsieh, retrieved
 * from http://www.azillionmonkeys.com/qed/hash.html on 2008/03/03. Given data
 * and its length, compute a 32-bit hash.
 **/
uint32_t r_hash_data(const char * data, int len);

/**
 * \brief This hash is taken from
 * http://www.concentric.net/~Ttwang/tech/inthash.htm . Use this to compute a
 * hash from an integer.
 **/
uint32_t r_hash_uint32(uint32_t a);

#endif /* R_HASH_H */
